from sqlalchemy import Column, Integer, String, TIMESTAMP, ForeignKey, Text
from base import Base  # 导入共享的 Base

class RedBookChatLog(Base):
    __tablename__ = 'red_book_chat_logs'
    id = Column(Integer, primary_key=True, autoincrement=True, comment="主键ID")
    user_uuid = Column(String(255), nullable=False, comment="用户id")
    chat = Column(Text, nullable=False, comment="聊天内容")
    message = Column(Text, nullable=False, comment="回复内容")
    img = Column(String(255), default=0, comment="生成的图片")
    created_at = Column(TIMESTAMP, comment='创建时间')
    updated_at = Column(TIMESTAMP, comment='更新时间')
    deleted_at = Column(TIMESTAMP, comment='更新时间')
    type = Column(Integer, default=1, comment="类型 1 chatglm 2 chatGpt")
